* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body, html {
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #141414;
  font-family: Arial, sans-serif;
}

.scene {
  width: 200px;
  height: 200px;
  perspective: 600px; /* Creates the 3D perspective */
}

.cube {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transform: rotateX(-30deg) rotateY(45deg);
  animation: rotateCube 6s infinite ease-in-out;
}

.face {
  position: absolute;
  width: 200px;
  height: 200px;
  background-color: rgba(255, 255, 255, 0.9);
  border: 2px solid #333;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 20px;
  font-weight: bold;
  color: #333;
}

/* Positioning the cube's faces */
.front  { transform: translateZ(100px); }
.back   { transform: rotateY(180deg) translateZ(100px); }
.left   { transform: rotateY(-90deg) translateZ(100px); }
.right  { transform: rotateY(90deg) translateZ(100px); }
.top    { transform: rotateX(90deg) translateZ(100px); }
.bottom { transform: rotateX(-90deg) translateZ(100px); }

/* Cube animation */
@keyframes rotateCube {
  0%   { transform: rotateX(-30deg) rotateY(45deg); }
  25%  { transform: rotateX(30deg) rotateY(135deg); }
  50%  { transform: rotateX(90deg) rotateY(225deg); }
  75%  { transform: rotateX(150deg) rotateY(315deg); }
  100% { transform: rotateX(210deg) rotateY(405deg); }
}
